﻿
@{
    ViewBag.Title = "Index";
}

<style>
    .remark {
        color: #444;
        font-size: 12px;
    }

    .item {
        font-size: 12px;
        line-height: 28px;
        border-bottom: solid 1px #000;
        margin-bottom: 20px;
    }

    h2 {
        font-size: 16px;
    }

    table th {
        line-height: 28px;
        font-weight: bold;
        width: 120px;
        font-size: 12px;
        text-align: left;
    }

    table td {
        line-height: 28px;
        width: 120px;
        font-size: 12px;
    }
</style>
<fieldset>
    <legend>加密工具</legend>
    <div class="item">
        <h2>
            要加密的值
        </h2>
        <div>
            @using (Html.BeginForm("Encode", "home", FormMethod.Post, new { target = "ajaxframe" }))
            {

                <div>
                    <input type="text" id="str" name="str" value="" />
                </div>
                    <div>
                        <input type="button" value="submit" onclick="querystr()" />
                    </div>
            }
            <div id="querystr">
            </div>
            <script>
                 function querystr() {
                     $.get("/Admin/home/Encode?time=" + new Date().getTime() + "&str=" + $("#str").val(), null, function (msg) {
                         $("#querystr").html(msg);
                     })
                 }
            </script>
        </div>
    </div>
</fieldset>

<h2>
    当前企业的access_token为：@ViewBag.access_token
</h2>
<iframe id="ajaxframe" name="ajaxframe" style="display: none"></iframe>
<fieldset>
    <legend>部门同步</legend>
    <div class="item">
        <h2>
            获取部门
        </h2>
        <div>
            @using (Html.BeginForm("getOrganization", "home", FormMethod.Post, new { target = "ajaxframe" }))
            {

                <div>
                    <input type="button" value="点击获取部门信息" onclick="getOrganization()" />
                </div>
            }
            <div id="getOrganization">
            </div>
            <script>
                function getOrganization() {
                    $.get("/Admin/home/getOrganization?time=" + new Date().getTime(), null, function (msg) {
                        $("#getOrganization").html(msg);
                    })
                }
            </script>
        </div>
    </div>
    <div class="item">
        <h2>
            创建部门
        </h2>
        <p>
            说明：
        </p>
        <div>
            @using (Html.BeginForm("createOrganization", "home", FormMethod.Post, new { target = "ajaxframe" }))
            {
                <p>
                    <span>id</span>@Html.TextBox("id")
                </p>
                    <p>
                        <span>parentid</span>@Html.TextBox("parentid")
                    </p>
                    <p>
                        <span>name</span>@Html.TextBox("name")
                    </p>
                    <p>
                        <span>order</span>@Html.TextBox("order")
                    </p>
                    <div>
                        <input type="submit" value="submit" />
                    </div>
            }
        </div>
    </div>
    <div class="item">
        <h2>
            修改部门
        </h2>
        <p>
        </p>
        <div>
    
        </div>
    </div>
    <div class="item">
        <h2>
            删除部门
        </h2>
      
    </div>
   
</fieldset>
<fieldset>
    <legend>人员管理</legend>
    <div class="item">
        <h2>
            获取成员详情
        </h2>
        <div>
            @using (Html.BeginForm("getMember", "home", FormMethod.Post, new { target = "ajaxframe" }))
            {

                <div>
                    <p>
                        <span>部门ID</span>@Html.TextBox("userid", "1")
                    </p>
                    <input type="button" value="点击获取下成员信息" onclick="getMember()" />
                </div>
            }
            <div id="getMember">
            </div>
            <script>
                function getMember() {

                    $.get("/Admin/home/getuserInfo?time=" + new Date().getTime(), "id=" + $("#userid").val(), function (msg) {
                        $("#getMember").html(msg);
                    })
                }
            </script>
        </div>
    </div>
    <div class="item">
        <h2>
            创建单个成员
        </h2>
        <div>
          
        </div>
    </div>

</fieldset>





